using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using Northwoods.Go.Xml;

namespace Rules.Diagram
{
    public abstract class Info : ICloneable
    {
        protected Info(RuleNode node)
        {
            myNode = node;
        }

        public Object Clone()
        {
            Info info = (Info)MemberwiseClone();
            info.Node = null;
            return info;
        }

        [Browsable(false)]
        public RuleNode Node
        {
            get { return myNode; }
            set { myNode = value; }
        }

        [Category("_Node")]
        public String Label
        {
            get { return this.Node.Text; }
            set { this.Node.Text = value; }
        }

        public virtual void GenerateAttributes(GoXmlTransformer x) { }

        public virtual void ConsumeAttributes(GoXmlTransformer x) { }

        private RuleNode myNode = null;
    }
}
